// 模拟数据

// 模拟设备数据
export const mockDevices = [
  {
    id: '1',
    device_name: '服务器-001',
    device_code: 'SERVER-001',
    device_type: '服务器',
    production_date: '2023-01-15',
    description: '主数据库服务器',
    qrcode_url: 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=SERVER-001',
    created_at: '2023-01-15T08:00:00',
    updated_at: '2023-01-15T08:00:00'
  },
  {
    id: '2',
    device_name: '网络交换机-002',
    device_code: 'SWITCH-002',
    device_type: '网络设备',
    production_date: '2023-02-20',
    description: '主网络交换机',
    qrcode_url: 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=SWITCH-002',
    created_at: '2023-02-20T10:30:00',
    updated_at: '2023-02-20T10:30:00'
  },
  {
    id: '3',
    device_name: '笔记本电脑-001',
    device_code: 'LAPTOP-001',
    device_type: '终端设备',
    production_date: '2023-03-10',
    description: '项目经理用笔记本电脑',
    qrcode_url: null,
    created_at: '2023-03-10T14:45:00',
    updated_at: '2023-03-10T14:45:00'
  },
  {
    id: '4',
    device_name: '打印机-003',
    device_code: 'PRINTER-003',
    device_type: '办公设备',
    production_date: '2023-04-05',
    description: '财务部门打印机',
    qrcode_url: 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=PRINTER-003',
    created_at: '2023-04-05T09:15:00',
    updated_at: '2023-04-05T09:15:00'
  },
  {
    id: '5',
    device_name: '防火墙-001',
    device_code: 'FIREWALL-001',
    device_type: '安全设备',
    production_date: '2023-04-25',
    description: '网络安全防火墙',
    qrcode_url: 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=FIREWALL-001',
    created_at: '2023-04-25T11:30:00',
    updated_at: '2023-04-25T11:30:00'
  },
  {
    id: '6',
    device_name: '存储阵列-001',
    device_code: 'STORAGE-001',
    device_type: '存储设备',
    production_date: '2023-05-10',
    description: '企业级存储阵列',
    qrcode_url: null,
    created_at: '2023-05-10T15:20:00',
    updated_at: '2023-05-10T15:20:00'
  },
  {
    id: '7',
    device_name: '生产流水线控制器',
    device_code: 'PROD-CTRL-001',
    device_type: '生产设备',
    production_date: '2023-05-20',
    description: '一号生产线控制器',
    qrcode_url: 'https://api.qrserver.com/v1/create-qr-code/?size=150x150&data=PROD-CTRL-001',
    created_at: '2023-05-20T16:40:00',
    updated_at: '2023-05-20T16:40:00'
  },
  {
    id: '8',
    device_name: '投影仪-001',
    device_code: 'PROJ-001',
    device_type: '办公设备',
    production_date: '2023-06-05',
    description: '会议室投影仪',
    qrcode_url: null,
    created_at: '2023-06-05T09:00:00',
    updated_at: '2023-06-05T09:00:00'
  }
];

// 模拟用户数据
export const mockUser = {
  id: '1',
  phone: '13812345678',
  username: '管理员',
  role: 'admin',
  avatar: 'https://api.dicebear.com/7.x/avataaars/svg?seed=admin',
  created_at: '2023-01-01T00:00:00',
  updated_at: '2023-01-01T00:00:00'
};

// 模拟仪表盘统计数据
export const mockDashboardStats = {
  totalDevices: 8,
  qrGenerated: 5,
  deviceTypes: [
    { name: '服务器', value: 1 },
    { name: '网络设备', value: 1 },
    { name: '存储设备', value: 1 },
    { name: '安全设备', value: 1 },
    { name: '终端设备', value: 1 },
    { name: '办公设备', value: 2 },
    { name: '生产设备', value: 1 },
    { name: '其他设备', value: 0 }
  ],
  recentActivities: [
    {
      id: 1,
      user: '张三',
      action: '创建',
      device: '服务器-001',
      time: '2023-05-20 14:30:22',
      avatar: '张'
    },
    {
      id: 2,
      user: '李四',
      action: '更新',
      device: '网络交换机-002',
      time: '2023-05-20 10:15:36',
      avatar: '李'
    },
    {
      id: 3,
      user: '王五',
      action: '生成二维码',
      device: '笔记本电脑-001',
      time: '2023-05-19 16:45:18',
      avatar: '王'
    },
    {
      id: 4,
      user: '赵六',
      action: '导出',
      device: '全部设备',
      time: '2023-05-19 09:20:45',
      avatar: '赵'
    },
    {
      id: 5,
      user: '张三',
      action: '删除',
      device: '打印机-003',
      time: '2023-05-18 15:10:30',
      avatar: '张'
    }
  ]
};

// 模拟登录凭证
export const mockCredentials = {
  password: {
    phone: '13812345678',
    password: '123456'
  },
  code: {
    phone: '13812345678',
    code: '123456'
  }
};

// 模拟JWT token
export const mockToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiIxIiwidXNlcm5hbWUiOiLlsI_pqawiLCJwaG9uZSI6IjEzODEyMzQ1Njc4Iiwicm9sZSI6ImFkbWluIiwiZXhwIjoxNzMxMDcwNDcwfQ.xG6rF7r7U5Z3wOJ6TQ3z5Z7r8T9y1X2W3Y4V5U6B7N8M9K0J';

// 导出所有mock数据
export default {
  mockDevices,
  mockUser,
  mockDashboardStats,
  mockCredentials,
  mockToken
};